package net.bwie.realtime.jtp.dws.trade.job;

import org.apache.flink.configuration.Configuration;
import org.apache.flink.table.api.EnvironmentSettings;
import org.apache.flink.table.api.TableEnvironment;

public class JtpOrderSkuAggregateDwsJob {
    public static void main(String[] args) {
        //1、创建TableEnv
        TableEnvironment tabEnv=getTableEnv();
        //2、创建输入表
        createInputTable(tabEnv);

    }

    private static void createInputTable(TableEnvironment tabEnv) {

    }

    private static TableEnvironment getTableEnv() {
        //  创建TableEnv
        EnvironmentSettings build = EnvironmentSettings.newInstance()
                .useBlinkPlanner()
                .inStreamingMode()
                .build();
        TableEnvironment tableEnv = TableEnvironment.create(build);
        //设置时区
        Configuration configuration = tableEnv.getConfig().getConfiguration();
        configuration.setString("table.local-time-zone", "Asia/Shanghai");
        configuration.setString("table.exec.resource.default-parallelism", "1");
        configuration.setString("table.exec.state.ttl", "5 s");
        return tableEnv;

    }
}
